package com.sh.healthtv.database.model;

import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.DataSupport;

import java.io.Serializable;

/**
 * Created by zhouyucheng on 2017/8/10.
 */

/**
 * 历史观看model
 */
public class HistoryProgram extends DataSupport implements Serializable, Parcelable {
    private String useId;
    private String name;
    private String imageUrl;
    private String playDate;
    private String playTime;
    private String playState;

    public String getUseId() {
        return useId;
    }

    public void setUseId(String useId) {
        this.useId = useId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getPlayDate() {
        return playDate;
    }

    public void setPlayDate(String playDate) {
        this.playDate = playDate;
    }

    public String getPlayTime() {
        return playTime;
    }

    public void setPlayTime(String playTime) {
        this.playTime = playTime;
    }

    public String getPlayState() {
        return playState;
    }

    public void setPlayState(String playState) {
        this.playState = playState;
    }

    @Override
    public String toString() {
        return "HistoryProgram{" +
                "useId='" + useId + '\'' +
                ", name='" + name + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", playDate='" + playDate + '\'' +
                ", playTime='" + playTime + '\'' +
                ", playState='" + playState + '\'' +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.useId);
        dest.writeString(this.name);
        dest.writeString(this.imageUrl);
        dest.writeString(this.playDate);
        dest.writeString(this.playTime);
        dest.writeString(this.playState);
    }

    public HistoryProgram() {
    }

    protected HistoryProgram(Parcel in) {
        this.useId = in.readString();
        this.name = in.readString();
        this.imageUrl = in.readString();
        this.playDate = in.readString();
        this.playTime = in.readString();
        this.playState = in.readString();
    }

    public static final Creator<HistoryProgram> CREATOR = new Creator<HistoryProgram>() {
        @Override
        public HistoryProgram createFromParcel(Parcel source) {
            return new HistoryProgram(source);
        }

        @Override
        public HistoryProgram[] newArray(int size) {
            return new HistoryProgram[size];
        }
    };
}
